Optimal. Leaf size=204 \[ \frac {\log ^2(x)}{2 a}-\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) \text {Li}_2\left (-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \text {Li}_2\left (-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2404, 2338,
2354, 2438} \begin {gather*} -\frac {\left (\frac {b}{\sqrt {b^2-4 a c}}+1\right ) \text {PolyLog}\left (2,-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \text {PolyLog}\left (2,-\frac {2 c x}{\sqrt {b^2-4 a c}+b}\right )}{2 a}-\frac {\log (x) \left (\frac {b}{\sqrt {b^2-4 a c}}+1\right ) \log \left (\frac {2 c x}{b-\sqrt {b^2-4 a c}}+1\right )}{2 a}-\frac {\log (x) \left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \log \left (\frac {2 c x}{\sqrt {b^2-4 a c}+b}+1\right )}{2 a}+\frac {\log ^2(x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2338
Rule 2354
Rule 2404
Rule 2438
Rubi steps
\begin {align*} \int \frac {\log (x)}{x \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac {\log (x)}{a x}+\frac {(-b-c x) \log (x)}{a \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac {\int \frac {\log (x)}{x} \, dx}{a}+\frac {\int \frac {(-b-c x) \log (x)}{a+b x+c x^2} \, dx}{a}\\ &=\frac {\log ^2(x)}{2 a}+\frac {\int \left (\frac {\left (-c-\frac {b c}{\sqrt {b^2-4 a c}}\right ) \log (x)}{b-\sqrt {b^2-4 a c}+2 c x}+\frac {\left (-c+\frac {b c}{\sqrt {b^2-4 a c}}\right ) \log (x)}{b+\sqrt {b^2-4 a c}+2 c x}\right ) \, dx}{a}\\ &=\frac {\log ^2(x)}{2 a}-\frac {\left (c \left (1-\frac {b}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {\log (x)}{b+\sqrt {b^2-4 a c}+2 c x} \, dx}{a}-\frac {\left (c \left (1+\frac {b}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {\log (x)}{b-\sqrt {b^2-4 a c}+2 c x} \, dx}{a}\\ &=\frac {\log ^2(x)}{2 a}-\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a}+\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {\log \left (1+\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{x} \, dx}{2 a}+\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {\log \left (1+\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{x} \, dx}{2 a}\\ &=\frac {\log ^2(x)}{2 a}-\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \log (x) \log \left (1+\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) \text {Li}_2\left (-\frac {2 c x}{b-\sqrt {b^2-4 a c}}\right )}{2 a}-\frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \text {Li}_2\left (-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 227, normalized size = 1.11 \begin {gather*} \frac {\log (x) \left (\sqrt {b^2-4 a c} \log (x)-\left (b+\sqrt {b^2-4 a c}\right ) \log \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{b-\sqrt {b^2-4 a c}}\right )+\left (b-\sqrt {b^2-4 a c}\right ) \log \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{b+\sqrt {b^2-4 a c}}\right )\right )-\left (b+\sqrt {b^2-4 a c}\right ) \text {Li}_2\left (\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )+\left (b-\sqrt {b^2-4 a c}\right ) \text {Li}_2\left (-\frac {2 c x}{b+\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(369\) vs.
\(2(178)=356\).
time = 0.83, size = 370, normalized size = 1.81
method | result | size |
default | \(\frac {\ln \left (x \right )^{2}}{2 a}+\frac {-\frac {\ln \left (x \right ) \left (\ln \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}+\ln \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b +\ln \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}-\ln \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right ) b \right )}{2 \sqrt {-4 c a +b^{2}}}-\frac {\dilog \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}+\dilog \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b +\dilog \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right ) \sqrt {-4 c a +b^{2}}-\dilog \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 \sqrt {-4 c a +b^{2}}}}{a}\) | \(370\) |
risch | \(\frac {\ln \left (x \right )^{2}}{2 a}-\frac {\ln \left (x \right ) \ln \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right )}{2 a}-\frac {\ln \left (x \right ) \ln \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a \sqrt {-4 c a +b^{2}}}-\frac {\ln \left (x \right ) \ln \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right )}{2 a}+\frac {\ln \left (x \right ) \ln \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a \sqrt {-4 c a +b^{2}}}-\frac {\dilog \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right )}{2 a}-\frac {\dilog \left (\frac {-2 c x +\sqrt {-4 c a +b^{2}}-b}{-b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a \sqrt {-4 c a +b^{2}}}-\frac {\dilog \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right )}{2 a}+\frac {\dilog \left (\frac {b +2 c x +\sqrt {-4 c a +b^{2}}}{b +\sqrt {-4 c a +b^{2}}}\right ) b}{2 a \sqrt {-4 c a +b^{2}}}\) | \(375\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (x\right )}{x\,\left (c\,x^2+b\,x+a\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________